package com.zky.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zky.common.utils.PageUtils;
import com.zky.gulimall.product.entity.AttrEntity;
import com.zky.gulimall.product.vo.AttrGroupRelationVo;
import com.zky.gulimall.product.vo.AttrRespVo;
import com.zky.gulimall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author zky
 * @email 574096634@qq.com
 * @date 2022-08-17 21:28:48
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils queryBaseAttr(Map<String, Object> params, Long catelogId, String attrType);

    AttrRespVo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attr);

    //根据分组id查所有属性
    List<AttrEntity> getRelationAttr(Long attrgroupId);

    void deleteRelation(List<AttrGroupRelationVo> relationVos);

    //查询当前分组未关联的属性
    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    //在指定的所有属性集合里挑出检索属性
    List<Long> selectSearchAttrIds(List<Long> attrIdList);
}

